﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EtapaMapa.aspx.cs" 

Inherits="UILGestion.VentaAdmin.UI.EtapaMapa" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register assembly="MapControl" namespace="MapControl" tagprefix="cc1" %>
<%@ Register src="../../Control/menuCtrl.ascx" tagname="menuCtrl" tagprefix="uc1" %>
<%@ Register Assembly="ExtAspNet" Namespace="ExtAspNet" TagPrefix="ext" %>
<%@ Register assembly="WebLib" namespace="WebLib" tagprefix="lib" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/fonts.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/global.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/theme.css" />
 
 


 <script src="../../Scripts/jquery.js" type="text/javascript"></script>
 <%--    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>--%>
 <%--en el mismo orden--%>
<script type="text/javascript" src="../../Scripts/src/core.js"></script>
<script type="text/javascript" src="../../Scripts/src/graphics.js"></script>
<script type="text/javascript" src="../../Scripts/src/mapdata.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.maphilight.min.js"></script>

<script type="text/javascript" src="../../Scripts/src/areadata.js"></script>
<script type="text/javascript" src="../../Scripts/src/areacorners.js"></script>
<script type="text/javascript" src="../../Scripts/src/scale.js"></script>

     
<link rel="stylesheet" href="../../Scripts/jquery-tooltip/jquery.tooltip.css" />   

<script src="../../Scripts/jquery-tooltip/lib/jquery.bgiframe.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-tooltip/lib/jquery.dimensions.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-tooltip/jquery.tooltip.js" type="text/javascript"></script>


    
    <style type="text/css">
    
   

ul#navigation {     position: fixed;     
                    margin: 0px;     
                    padding: 0px;     
                    top: 150px;     
                    left: 0px;     
                    list-style: none;     
                    z-index:9999; }

ul#navigation li {     width: 50px; }
ul#navigation li a      
{
	display: block;     
	margin-left: -385px;     
	width: 400px;     
	height: 300px;     
	background-color:#CFCFCF;     
	background-repeat:no-repeat;     
	background-position:center center;     
	border:1px solid #AFAFAF;     
	-moz-border-radius:0px 10px 10px 0px;     
	-webkit-border-bottom-right-radius: 10px;     
	-webkit-border-top-right-radius: 10px;     
	-khtml-border-bottom-right-radius: 10px;     
	-khtml-border-top-right-radius: 10px;     
	opacity: 0.9;     
	filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60); }

ul#navigation .Imagen1 a    
{
	
	 } 

    </style>



<script type="text/javascript">


    $(function () {
        $('.mapHiLight').maphilight({ fade: false });
        
    });



    $(document).ready(function () {
        $(".scroll").click(function (event) {
            event.preventDefault();
            var offset = $($(this).attr('href')).offset().top;
            $('html, body').animate({ scrollTop: offset }, 500);
        });
    });
            



    $(function () {
        $('#navigation a').stop(). animate({ 'marginLeft': '-385px' }, 1000);
        $('#navigation > li').hover(function () {
                                    $('a', $(this)).stop().animate({ 'marginLeft': '-9px' }, 100);
        }, function () {
            $('a', $(this)).stop().animate({ 'marginLeft': '-385px' }, 1000);
        });
    });


	function __IMAGEMAP_onClick(index,id) {
	    
	    //estado de la propiedad 
	    //id de la propiedad
	    //proyecto de la propiedad
        
                var elem = id.split('|');
                idProyecto = elem[0];
                idui = elem[1];
                estado = elem[2];
              

                    //por vender
                    if (estado == 1) {
                        if (confirm('¿Generar Orden de Venta?')) {
                            location.href = '../OrdenVenta/OrdenVentaEditForm.aspx?type=A&idProyecto=' + idProyecto + '&idUI=' + idui;
                        }
                        else {
                            if (confirm('¿Generar Proforma?')) {
                                location.href = '../Proforma/ProformaEditForm.aspx?type=A&idProyecto=' + idProyecto + '&idUI=' + idui;
                            }
                             
                        }
                     }

                     if (estado == 2 |estado == 16) {
                         //vendido
                         PageMethods.GetOrdenventa(id, OnMyMethodComplet); 
                     } 
              
	}


     function OnMyMethodComplet(result, eventToUpdate, methodName) {
        if (result != null) {

            var elem = result.split('|');
            idProyecto = elem[0];
            id = elem[1];
            
            location.href = '../OrdenVenta/OrdenVentaReadForm.aspx?idProyecto=' + idProyecto + '&id=' + id;
                                      
        }
    }


        default_options =
        {
            fillOpacity: 0.4,
            fadeInterval: 50,
            isSelectable: true,
            staticState: false,
            singleSelect: true,
            mapKey: 'state',
            mapValue: 'full',
            listKey: 'name',
            
            areas: [
                { key: "SEPARADO",
                  
                     fillColor: 'FFCC00',
                   
                    staticState: true
                 },
                { key: "VENDIDO",
                    
                    fillColor: '008000',
                    
                    staticState: true
                },
                { key: "DISPONIBLE",
                    
                    fillColor: 'ff000c',

                    staticState: true
                },
                { key: "BLOQUEADO",
                    fillColor: 'a0a0a0',
                    staticState: true
                }
                ]
        };



   



</script>

</head>
<body>
    <form id="form1" runat="server">
 
      <asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server" 
      EnableScriptGlobalization="true"  
      AsyncPostBackTimeOut="36000"
     EnablePartialRendering="true" 
     EnablePageMethods="true"
     />
      <%-- <ext:PageManager ID="PageManager1" AutoSizePanelID="RegionPanel1" HideScrollbar="true" 
        runat="server"></ext:PageManager>
     





      <ext:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server">
        <Regions>
            
       

            <ext:Region ID="mainRegion"  ShowHeader="false" Layout="Fit"  Margins="0 0 0 0" Position="Center"
                runat="server">
                <Items>
                <ext:ContentPanel ShowBorder="false" ShowHeader="false"   Title="Seleccione  Unidad Inmobiliaria" 
                
                        ID="ContentPanel2" runat="server">--%>


    
    
 <uc1:menuCtrl ID="menuCtrl1" runat="server" />                


       
 
  
                         
      <asp:Panel ID="pnlMain" runat="server" 
       CssClass="Heading secTitle AreaHeading ms-crm-List-Header " >
<asp:Label ID="Label1" runat="server" Text="SELECCIONAR UNIDAD INMOBILIARIA" 
             style="font-size: large; color: #960818"></asp:Label>
    </asp:Panel>
 <%--   <div style="position:fixed  ">
  </div>  
  <div style="position:absolute ; top:50px"> </div>--%>
   <input id="idEtapaSeleccion" type="hidden" runat="server" />

    <ul id="navigation">  
  <li class="Imagen1">
    <a title="PROYECTO"  style="vertical-align:middle; text-align:right">  <cc1:ImageMap ID="mapProyecto" runat="server"  CssClass="mapHiLight"  /></a>   
  </li>  
  
  </ul>
    <asp:Panel ID="detallePNL" runat="server" 
      BorderColor="LightSkyBlue" BorderWidth="1"   >

  
   
    <asp:Table border="0" Width="100%" cellpadding="0" cellspacing="0"  class="maptablainfo2" 
      ID="etapasTable" runat="server" >
    
  
    </asp:Table>
    <br />
    <br />
    <br />
    <br />
    <br />
       <br />
    <br />
    <br />
    <br />
    <br />
    </asp:Panel>
               


    </form>
</body>
</html>
